package com.smart.statistics.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.smart.common.utils.R;
import com.smart.statistics.client.YunDemoApiClient;


/**
 * 电子券信息表
 *
 * @author zhouwc
 * @email zhouwenchao@smart.net.cn
 * @date 2019-07-28 10:30:19
 */

@Controller
@RequestMapping("/yun/demo1")
public class ServiceDemo1Controller {

    private static final Logger logger = LoggerFactory.getLogger(ServiceDemo1Controller.class);
    private static final Logger demoServiceLog = LoggerFactory.getLogger("demoService");

    @Autowired
    private YunDemoApiClient apiClient;

    @RequestMapping("/test")
    @ResponseBody
    public R test(){
    	
    	demoServiceLog.info("开始执行demo服务...");
    	logger.info("do service.demo1.test");
    	
    	Object o = null;
    	
    	if(o.equals("null")) {
    		//..
    	}
    	
//    	R geneEcpCodesByCardc = apiClient.geneEcpCodesByCardc();
//    	logger.info("result:"+geneEcpCodesByCardc.toString());
    	
    	
    	demoServiceLog.info("结束执行demo服务...");
    	
        return R.ok("service.demo1.test");
    }
   

}
